package com.amigo.online.provider.merchant.utils;

/**
 * @version: V1.0.0
 * @Description: （语言类的枚举类，）
 * @author: zxy  QQ:1363320658
 * @date: 2018年11月30日 上午10:23:09
 */
public enum LanguageEnum {
    /**
     * ios 中文
     */
    IOS_CHINA("zh-Hans", "name_cn"),
    /**
     * ios 英文
     */
    IOS_ANDROID_ENGLISHT("en", "name_en"),
    /**
     * ios android 西班牙语
     */
    IOS_ANDROID_SPANISH("es", "name_es"),
    /**
     * ios 葡萄牙语
     */
    IOS_PORTUGUESE("pt-BR", "name_pt"),
    /**
     * android 中文
     */
    ANDROID_CHINA("zh", "name_cn"),
    /**
     * android 葡萄牙语
     */
    ANDROID_PORTUGUESE("portuguese", "name_pt"),
    /**
     * android 葡萄牙语
     */
    ANDROID_PORTUGUESE2("pt", "name_pt");

    //,ANDROID_ENGLISHT("en","name_en"),ANDROID_SPANISH("es","name_es")
    private String language;
    private String columnName;

    private LanguageEnum(String language, String columnName) {
        this.language = language;
        this.columnName = columnName;
    }

    public static String getColumnName(String language) {
        for (LanguageEnum temp : LanguageEnum.values()) {
            if (temp.language.equals(language)) {
                return temp.columnName;
            }
        }
        return "name_pt";
    }

}
